package com.skywolf.chem.match.common.enums;

/**
 * 支付类型
 *
 * @Author sj
 * Date on 2021/9/26  10:21
 * @Version 1.0
 */
public enum MatchPayTypeEnum {

    //1->>微信支付   2->>支付宝支付
    WX_JSAPI(1, "微信JSAPI支付"),
    ALIPAY(2, "支付宝支付");

    private Integer type;
    private String name;

    MatchPayTypeEnum(final Integer type, final String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return this.type;
    }

    public static MatchPayTypeEnum getByCode(Integer type) {
        MatchPayTypeEnum payTypeEnum = null;

        for (MatchPayTypeEnum value : values()) {
            if (value.getType().equals(type)) {
                payTypeEnum = value;
            }
        }
        return payTypeEnum;
    }
}
